Skip to content

Update copilot instructions#454

Merged
rjmurillo merged 4 commits intomainfrom
feature/update-copilot-instructions
Jun 9, 2025
Merged

Update copilot instructions#454
rjmurillo merged 4 commits intomainfrom
feature/update-copilot-instructions

Conversation

@rjmurillo
Copy link
Copy Markdown
Owner

@rjmurillo rjmurillo commented Jun 9, 2025

Updates GitHub Copilot, Cursor, and Windsurf rules for working with C#

Summary by CodeRabbit

  • Documentation
    • Rewrote and expanded the contributor and Copilot instructions into a comprehensive, structured guide with strict workflow, quality standards, and detailed requirements for C# development.
  • Chores
    • Added new configuration files to enforce reading and applying the updated instructions when working with C# source or project files.

rjmurillo added 3 commits June 8, 2025 16:19
- Revised the structure and content of the Copilot and contributor instructions for better clarity and adherence to guidelines.
- Emphasized mandatory compliance with instructions and added specific workflow steps to ensure consistency in contributions.
- Included detailed requirements for test coverage, documentation, and handling of automated feedback.
- Streamlined sections on troubleshooting and proactive checks to improve developer experience.

This update aims to ensure all contributors follow best practices and maintain high-quality standards in the project.
- Revised instructions to specify that all code must target **.NET 9** and **C# 13**.
- Clarified guidelines on test coverage, emphasizing the need for 100% coverage and the importance of writing tests first.
- Enhanced documentation requirements for public APIs, mandating clear XML documentation.
- Introduced a new section on reasoning and code quality, outlining best practices for explicit logic and error handling.
- Added a checklist for Copilot-specific output to ensure high-quality contributions.

These updates aim to improve code quality and maintainability across the project.
- Introduced a new `csharp.mdc` file to enforce reading and applying instructions from `copilot-instructions.md` for C# source and project files.
- Set `alwaysApply` to false, allowing for flexible application of the rules.

This addition aims to enhance the development process by ensuring adherence to established guidelines when working with C# projects.
Copilot AI review requested due to automatic review settings June 9, 2025 01:05
@rjmurillo rjmurillo requested a review from MattKotsenas as a code owner June 9, 2025 01:05
- Updated `csharp.mdc` to improve the application of rules from `copilot-instructions.md` for C# files.
- Adjusted `alwaysApply` setting to allow for more flexible rule enforcement.

These changes aim to refine the adherence to guidelines in C# projects, promoting better development practices.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jun 9, 2025

Warning

Rate limit exceeded

@rjmurillo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 26 minutes and 10 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 461bc6c and 0e45b61.

📒 Files selected for processing (3)
  • .cursor/rules/csharp.mdc (1 hunks)
  • .github/copilot-instructions.md (1 hunks)
  • .windsurf/rules/csharp.md (1 hunks)
📝 Walkthrough

Walkthrough

This change introduces new rules configuration files to enforce the use of detailed contributor and Copilot instructions for C# development. The .github/copilot-instructions.md document is extensively rewritten and expanded, and both .cursor/rules/csharp.mdc and .windsurf/rules/csharp.md are added to ensure these instructions are referenced for C# source and project files.

Changes

File(s) Change Summary
.github/copilot-instructions.md Rewritten and expanded contributor and Copilot instructions with stricter workflow, compliance, and code quality standards.
.cursor/rules/csharp.mdc, .windsurf/rules/csharp.md Added rules configuration files to enforce referencing the Copilot instructions for all C# source and project files.

Sequence Diagram(s)

sequenceDiagram
    participant Contributor
    participant RuleConfig
    participant InstructionsDoc

    Contributor->>RuleConfig: Edit or create C# file (*.cs, *.csproj, *.sln)
    RuleConfig-->>Contributor: Trigger rule for C# files
    RuleConfig->>InstructionsDoc: Reference copilot-instructions.md
    InstructionsDoc-->>Contributor: Enforce workflow and standards
    Contributor->>Contributor: Follow enforced instructions for PR
Loading

Possibly related PRs

  • Strengthen Copilot instructions #426: Adds new C# rules configuration files referencing the .github/copilot-instructions.md for enforcement, directly related through the shared use and update of the Copilot instructions.
  • Update Compiler.props LangVersion #333: Updates compiler language version settings to support newer C# versions, related to enforcing .NET 9 and C# 13 usage as specified in the new instructions.

Suggested labels

codex

Suggested reviewers

  • MattKotsenas

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@rjmurillo rjmurillo merged commit c1381b5 into main Jun 9, 2025
7 of 10 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request updates the rule definitions and instructions for GitHub Copilot, Cursor, and Windsurf when working with C# projects. It makes three key changes:

  • Adds C# rule configurations in the Windsurf rules file.
  • Revises and expands the Copilot instructions in the GitHub repository.
  • Adds a Cursor rules file with guidance on applying the Copilot instructions.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.windsurf/rules/csharp.md New file defining glob triggers with a reference to the copilot instructions.
.github/copilot-instructions.md Updated instructions including mandatory steps, .NET 9/C# 13 targets, and testing requirements.
.cursor/rules/csharp.mdc New file providing similar instructions for Cursor with a different link format.
Comments suppressed due to low confidence (1)

.cursor/rules/csharp.mdc:6

  • Consider unifying the reference link format to 'copilot-instructions.md' across different rule files for consistency. For example, use the same format as in the Windsurf rules file.
Always read and apply the instructions in [copilot-instructions.md](mdc:.github/copilot-instructions.md) when working on C# source or project files

@rjmurillo rjmurillo deleted the feature/update-copilot-instructions branch June 9, 2025 01:05
@rjmurillo rjmurillo added this to the vNext milestone Jun 9, 2025
@codacy-production
Copy link
Copy Markdown

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%) (target: 95.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (461bc6c) 870 789 90.69%
Head commit (0e45b61) 870 (+0) 789 (+0) 90.69% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#454) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants